import { createRouter, createWebHistory } from 'vue-router'
import Home from '@/views/home/home.vue'
import Index from '@/views/home/index.vue'
import Fl from '@/views/home/fl.vue'
import Gwc from '@/views/home/gwc.vue'
import Wd from '@/views/home/wd.vue'
import register from '@/views/register/index.vue'
import login from '@/views/login/index.vue'
import Search from '@/views/home/search.vue'

const router = createRouter({
  history: createWebHistory(import.meta.env.BASE_URL),
  routes: [
    {path:'/register',component:register},
    {path:'/login',component:login},
    {path:'/',redirect:'register/index'},
    {path: '/home',component: Home,children:[
      {path:'index',component:Index},
      {path:'fl',component:Fl},
      {path:'gwc',component:Gwc},
      {path:'wd',component:Wd},
      {path:'search',component:Search},
    ]},
  ],
})

export default router
